package com.work.game.home.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebView;

import com.work.game.R;
import com.work.game.config.UrlAddressConfig;
import com.work.game.volley.BaseActivity;

import cn.hutool.core.util.ObjectUtil;

public class WebViewActivity extends BaseActivity {

    private WebView webView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        setContentView(R.layout.activity_web_view);
        super.onCreate(savedInstanceState);
        Intent intent = getIntent();
        if (ObjectUtil.isNull(intent)) {
            return;
        }
        String value = intent.getExtras().getString("tag");
        tvActionbarTitle.setText(value);
        webView.getSettings().setJavaScriptEnabled(true);
        webView.getSettings().setDomStorageEnabled(true);
        webView.getSettings().setMediaPlaybackRequiresUserGesture(false);
        webView.loadUrl(UrlAddressConfig.URL_WEB_VIEW + "/setup/" + value + ".html");
    }

    @Override
    public void initView() {
        super.initView();
        webView = findViewById(R.id.wv_web);

    }
}